<?

session_start();

$dbhost = 'localhost';

$dbusername = 'bestgame_razvan';

$dbpasswd = '20010317martie';

$database_name = 'bestgame_diete';



$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") 

	or die ("Couldn't connect to server.");

	

$db = mysql_select_db("$database_name", $connection)

	or die("Couldn't select database.");

	

include "login.class.php";

$login =  new Login("membri","username,password","username_session,password_session","username,password");

if($login->logged_in && isset($_POST['username']) && !isset($_POST['email']) && $_SESSION['date']['activ'] != 1){
$login->logout();
header("Location: ".$CS."activeaza-cont/");
}

$CS = "http://www.best-games-arena.com/diete4u/";

function setare($nu){
	return @mysql_result(mysql_query("select continut from setari where nu = '$nu'"),0);
}

function data_normala($data){
$luni = array("","ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie");

$d = explode("-",$data);

return $d[2]." ".$luni[intval($d[1])]." ".$d[0];
}

?>